<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
    }
    div {
      height: 10vmax;
      width: 10vmax;
      /* background-color: red; */
    }

    body {
      background-color: blue;
    }

    @media screen and (max-width: 1024px) {
      body {
        background-color: red;
      }
    }
  </style>
  <body>
    <div></div>
    <!-- 
        网页视口尺寸
    window.screen.height //屏幕高度
    window.innerHeight //网页可见区域高度
    document.body.clientHeight //body高度
----------------------------------------------
        vw/vh单位
    vw/vh = 网页视口的宽度/高度
    vmax 取两者的最大值，vmin取两者的最小值
    -->
  </body>
  <script>
    console.log(window.screen.height);
    console.log(window.innerHeight);
    console.log(document.body.clientHeight);
  </script>
</html>
